propagate build.python into cmake #53967
Merged
+4
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If a suitable value of Python is not on
PATH
, one can still invoke x.pymanually, which propagates
BOOTSTRAP_PYTHON
into the bootstrapenvironment. But building LLVM will abort with error messages about not
being able to find Python, and instructions to set
PYTHON_EXECUTABLE
,because nothing is done with
BOOTSTRAP_PYTHON
when invoking cmake.Setting
build.python
in config.toml had no effect in this scenario,either
To fix this, let's provide
PYTHON_EXECUTABLE
when invoking cmake; forthe "normal" case of Python in
PATH
, this doesn't alter any behavior.For more unusual cases, however, this ensures cmake finds Python
properly. (This change also ensures there are no differences between
what bootstrap is using, and what cmake uses, which may be useful for
consistency's sake.)